package org.qiyu.live.im.router.provide;

import com.alibaba.fastjson2.JSON;
import jakarta.annotation.Resource;
import org.qiyu.live.im.dto.ImMsgBody;
import org.qiyu.live.im.router.provide.service.ImRouterService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @Description: //todo
 * @Author: 张广焱
 * @Date: 2023-12-10 2:22
 */
@SpringBootApplication
public class ImRouterProviderApplication  implements CommandLineRunner {
    @Resource
    private ImRouterService imRouterService;
    public static void main(String[] args) throws InterruptedException {
        SpringApplication springApplication = new SpringApplication(ImRouterProviderApplication.class);
        springApplication.setWebApplicationType(WebApplicationType.NONE);
        springApplication.run(args);
    }
    @Override
    public void run(String... args) throws Exception {
        for (int i = 0; i <1000 ; i++) {
//            ImMsgBody imMsgBody = new ImMsgBody();
//            imRouterService.sendMsg(1001L, JSON.toJSONString(imMsgBody));
        }

    }
}
